#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QHash>
#include "player.h"

class LcdSplitManager;
class LcdConfigParser;

class MainWindow : public QWidget
{
    Q_OBJECT
public:
	static MainWindow* instance();
    ~MainWindow();
public slots:
	bool splitWindow(const QString& xmlConfigFilePath);
	bool setSubWindowContent(int windowNo, PlayerType type, const ValuePacket& valuePacket);
	Player* getPlayer(int windowNo) const;
private:
	explicit MainWindow(QWidget *parent = 0);
	int getMonitorNum();
	int getMonitorWidth(int monitorNo);

	QWidget* m_MainWidget;
	LcdSplitManager* m_Manager;
	LcdConfigParser* m_Parser;
	QHash<int, Player*> m_WindowNoToPlayer;
};

#endif // MAINWINDOW_H
